﻿<!--#include file="../Include/Config.asp"-->
<table width="585" border="0" cellspacing="0" cellpadding="0" class="table">
  <tr>
    <th colspan="2">此问卷下已有的题目</th>
    <th width="386">&nbsp;</th>
  </tr>
  <tr>
<%
Survey_id=request.QueryString("Survey_id")
action=request.QueryString("action")
page_size=5
sql="select * from survey where Survey_id="&Survey_id&""
rs.open sql,conn,1,3
if rs.eof then
call ShowAlert("参数错误","") 
end if
if not rs("Survey_content")="" then
Survey_content=split(rs("Survey_content"),",")
select case action
  case "next"
  session("page_start")=session("page_start")+page_size
  case "last"
  session("page_start")=session("page_start")-page_size
  case "end"
  if (ubound(Survey_content)+1)\page_size<>(ubound(Survey_content)+1)/page_size then
  session("page_start")=((ubound(Survey_content)+1)\page_size)*page_size
  else
  session("page_start")=(((ubound(Survey_content)+1)\page_size)-1)*page_size
  end if
  case "start"
  session("page_start")=0
end select
page_start=session("page_start")
page_end=page_start+page_size-1
if page_end>ubound(Survey_content) then
page_end=ubound(Survey_content)
end if
for i=page_start to page_end
if not Survey_content(i)="" then
sql="select * from question where Question_id="&Survey_content(i)&""
rst.open sql,conn,1,1
if not rs.eof then
%>  
    <td><li style="list-style:none"><%=i+1%>、<%=rst("Question_content")%></li>	</td>
    <td>&nbsp;</td>
  </tr>
<%
end if
rst.close
end if
next


else
response.Write("<td colspan=""2"">本问卷下暂时没有任何题目，请添加</td>")
response.Write("<td colspan=""2"">&nbsp;</td>")
end if
rs.close
%>

</table>

